import request from '@/utils/request';
import qs from 'qs'

// 获取验证码
export function captcha(): Promise<IResponseType<captcha>> {
	return request({
		url: 'api/captcha',
		method: 'get',
	});
}
// 登录
export function login(data:loginFormDto) {
  return request({
    url: '/login' + '?' + qs.stringify(data, { indices: false }),
    method: 'post',
    data
  })
}

// 获取用户信息
export function getInfo() {
  return request({
    url: 'api/auth/userInfo',
    method: 'get'
  })
}

// 登出
export function logout() {
  return request({
    url: '/logout',
    method: 'post',
  })
}


export function updataPass(data: any) {
  return request({
    url: 'api/sysUser/updataPass',
    method: 'post',
    data
  })
}
